
********************************************************************************
****** The Effects of WWII on Economic and Health Outcomes across Europe *******
********************************************************************************
* Authors: Iris Kesternich, Bettina Siflinger, James P. Smith, Joachim Winter
* Review of Economics and Statistics, 2014
********************************************************************************
* DOFILE: TABLE 3, SEX RATIO
********************************************************************************


clear
clear matrix
clear mata
set more off


*** define the path to the directory containing the data files here 
*** or leave "." if the do files are in the current directory 

global datapath "."

*** define the path to the directory to which figures are saved here 
*** or leave "." if they should be saved to the current directory 

global graphpath  "."



insheet using "$datapath\external\txt\sex_ratio.txt"
drop v4
ren v2 country
ren v3 sex_ratio
encode country, g(country_2)
recode country_2 (1 = 11)(7 = 12)(2 = 23)(3 = 20)(4 = 28)(5 = 18)(6 = 17)(8 = 19)(9 = 16)(10 = 14)(11 = 29)(12 = 15)
drop country
gen country = country_2
drop country_2

save "$datapath\external\dta\sex_ratio.dta", replace



********************************************************************************
*** Table 3: percentage father absent, hunger, dispossessed, sex ratio
********************************************************************************

tabstat sex_ratio if year <  1939 & country ~= 15, by(country)
tabstat sex_ratio if year >= 1945 & year < 1948 & country ~= 15, by(country)
tabstat sex_ratio if year >= 1945 & country ~= 15, by(country)





